#ifndef LOGINDLG_H
#define LOGINDLG_H

#include <QDialog>
#include<ui_logindlg.h>

// 前置声明MainWindow类
class MainWindow;
class Admin;
namespace Ui {
class logindlg;
}

class logindlg : public QDialog
{
    Q_OBJECT

public:
    explicit logindlg(QWidget *parent = nullptr);
    ~logindlg();
    int getSelectedRole() const;
    QString getUserId() const; // 获取当前选择的角色和用户ID

private slots:
    void on_radioStudent_toggled(bool checked);
    void on_radioAdmin_toggled(bool checked);
    void on_radioDormManager_toggled(bool checked);
    void on_btnLogin_clicked();
    void on_btnCancel_clicked();

private:
    Ui::logindlg *ui;
    MainWindow *mainWindow;
    Admin *admin;
};

#endif // LOGINDLG_H
